package com.changgou.seckill.feign;

import com.changgou.seckill.pojo.SeckillGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 *
 */
@FeignClient(name = "seckill")
@RequestMapping("/seckillgoods")
public interface SeckillGoodsFeign {

    /**
     * 根据时间菜单, 加载秒杀商品列表数据返回
     * @param time 传入的时间菜单, 年-月-日 时:分:秒 格式
     * @return
     */
    @GetMapping("/list/{time}")
    public List<SeckillGoods> list(@PathVariable(value = "time") String time);
}
